package org.example;

import org.example.component.BlockingQueueConsumer;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableAsync;

@SpringBootApplication
@MapperScan("org.example.mapper")
@EnableAsync
public class ApplicationMain 
{

	
	public static void main(String[] args) 
	{
		SpringApplication.run(ApplicationMain.class,args);
	}

	@Autowired
	BlockingQueueConsumer blockingQueueConsumer;
	
	@Bean
	public ApplicationRunner applicationRunner()
	{
		return ApplicationMain ->{
			//redis的list异步
//			blockingQueueConsumer.startConsuming();
		};
	}
}